package corestruct

import (
	"core/class"
	"core/selfreg"
	"reflect"
)

type IdNameDto struct {
	Id int64 `json:"id,string"                         gorm:"column:id;primaryKey;comment:主键;autoIncrement:false;"`

	Name string `json:"name"         validate:"required,max=50"gorm:"column:name;size:50;DEFAULT:'';not null;comment:名称;"`
}

/**
*注册类型
 */
func init() {
	var mcls = &IdModel{}
	var m = &class.MyClass{
		Name:     "带名称Dto",
		Ename:    "",
		FullName: "",
		Memo:     "",
		Fileds:   nil,
		PrjName:  "",
		Type:     reflect.TypeOf(mcls),
	}
	selfreg.AddDto(m)
}
